
a =  59398519837969938359106832224056187683937568250770488082448642852427682484407513407602969
b =  32787000674666987602016858366912565306237308217749461581158833948068732710645816477126137
n =  43520375935212094874930431059580037292338304730539718469760580887565958566208139467751467
c =  8594514452808046357337682911504074858048299513743867887936794439125949418153561841842276

import libnum

a1=libnum.invmod(a,n)

for i in range(10):
    c=pow(a1*(c-b),1,n)
m=c
print(m)
print(libnum.n2s(m))